#include "rtsp2ws_server.h"

#include <signal.h>

Rtsp2wsServer server;

void my_handler(int s) {
    server.Stop();
    printf("exit app.\n");
}

int main(int argc, char** argv) {
    struct sigaction sigIntHandler;

    sigIntHandler.sa_handler = my_handler;
    sigemptyset(&sigIntHandler.sa_mask);
    sigIntHandler.sa_flags = 0;

    sigaction(SIGINT, &sigIntHandler, NULL);
    server.Start("0.0.0.0", 2000);
}
